<?php
session_start();
if (!$_SESSION['user']){
    header(header:'Location:login.php');
    return;
}
unset($_SESSION['user']);
header(header:'Location:login.php');1
